var t = require("../../api.js"), a = getApp(), s = !1, n = !1, o = 2;

Page({
  data: {
    status: -1,
    daili_list: [],
    show_no_data_tip: !1
  },
  onLoad: function (t) {
    a.pageOnLoad(this, t), s = !1, n = !1, o = 2, this.LoadDailiList();
  },
  onReady: function () { },
  onShow: function () { },
  LoadDailiList: function () {
    var n = this;
    wx.showLoading({
      title: "正在加载",
      mask: !0
    }), a.request({
      url: t.daili.daili_team,
      data: {},
      success: function (t) {
        0 == t.code && n.setData({
          daili_list: t.data.list
        }), n.setData({
          show_no_data_tip: 0 == n.data.daili_list.length
        });
      },
      complete: function () {
        wx.hideLoading();
      }
    });
  },
  onHide: function () { },
  onUnload: function () { },
  onPullDownRefresh: function () { },
  onReachBottom: function () {
    var i = this;
    n || s || (n = !0, a.request({
      url: t.daili.daili_team,
      data: {
        page: o
      },
      success: function (t) {
        if (0 == t.code) {
          var a = i.data.daili_list.concat(t.data.list);
          i.setData({
            daili_list: a
          }), 0 == t.data.list.length && (s = !0);
        }
        o++;
      },
      complete: function () {
        n = !1;
      }
    }));
  }
});